update extension and mime-type creation logic to use case block instead of if / else
add tests for mime-type feature