Refactored get_priv_files() to return an empty array on error, and cleaner blacklisting of invalid directories/files.