Improve cluster file handling path validation in end_receiving_file