Tests if a given path resolves to a file.