From http://stackoverflow.com/questions/924394/how-to-get-file-name-without-the-extension