Add some error handling to tally.lua
Move array of file extensions and "findtype" function to separate module