preservationmeter: improved code based on comments

* Added print_function import
* Added current_app import from flask
* Added cfg to test_api

Signed-off-by: Joao Goncalves <jsvgoncalves@gmail.com>
preservationmeter: Added more test defs, refactor

* Added some test definitions
* Refactored get_extension and get_name

Signed-off-by: Joao Goncalves <jsvgoncalves@gmail.com>