Sortmerna api

App controller + accompanying unit tests
If I understand correctly, here you are getting the basename of a path right? If you have `/path/to/database.db` you're getting `database.db`. If that is correct, it will be safer to use the built-in function [`basename`](https://docs.python.org/2/library/os.path.html#os.path.basename) from the `os.path` module.