check if path is a regular file