fix broken handling of file paths