Ensure that invalid filepaths are rejected