Raises exception for bad filepath.