correctly get original module filename bytecode module

use correct extension for Python bytecode files (e.g. .pyc).
don't crash if document has no .json_metadata attribute.

This will always be the case if the document was edited before
the repo_branch was created.
don't count path_rel when comparing document and module models

File.path_rel is added when instantiating File and is not part
of model definitions.