Port office meta and fix unicode bug.

If the directory name had invalid bytes in it, pymongo throws an exception
when trying to add the results back to the database. Just remove those bytes.