Fixed thefile.me urlresolver

thefile.me resolver was broken. This fixes it. I also cleaned up some of the utility functions in it.