Proper handling of filenames