Make filemode conversion more strict

Only allow '100755' and '100644' as per spec
Merge pull request #4 from olegpesok/perms

Make filemode conversion more strict