Shortcircuit to help dedent.
Misleading comment
Less magic in path handling.
Empty dictionaries prevent hidden errors.
Syntax simplification
Avoid writing into parameters.
Only return metadata that has values.
Make 'get_meta' handle all metadata cases.
No metadata means no key, not empty string.
Further cleanup of the metadata fragments.
Typo in destination building.