Discard non-regular files (fixes #292)