Implement right semantics for wait with version
Merge pull request #50 from EasonLiao/wait

wait should return if file/directory gets deleted before reaching the version