Fix some bugs with file paths.