Filepath-related fixes (how did this ever work?!)