Fix and test compile_file.