Make sure any whitespace of \n characters are removed from filepaths.