fixed logic error with dealing with filename parts
Merge pull request #5 from ksmithut/develop

fixed logic error with dealing with filename parts