Fix erroneously quoted target_file and add test for PathToURL