Get databasename from URI

Fixes #19