Factor out maybe_remove_extension/1 function
Factor out maybe_remove_extension/1 function

COUCHDB-3080

cloudant/couchdb-couch,apache/couchdb-couch,fkaempfer/couchdb,fkaempfer/couchdb,cloudant/couchdb-couch,apache/couchdb-couch,fkaempfer/couchdb,cloudant/couchdb-couch,fkaempfer/couchdb,fkaempfer/couchdb,apache/couchdb-couch,fkaempfer/couchdb