fixed bug with parsing empty file extension

fixed bug with parsing empty file extension