Use hasOwnProperty to check if filename in entries

This works around an obscure issue when a file or directory in the filesystem happens to share its name with a native javascript function. For example, if a directory called `hasOwnProperty` were to change then `filename in self.entries` would evaluate as `true` even though it’s not *really* in entries.