fixed small problem with getting the file extension
finished merge of getExtension method