added listdir function
fixed a bug with currentCommit - now works if there is no git repo