added cleanup after sigint
added get_mime_type()
testimplementation of mimetype cache. does not work because bash 4
seems to be unable to export an array