fixed bug for no-directory case
Merge pull request #5 from pa-vishal/fix-bug-init-dir-for-firsttime-user

fixed bug for no-directory case