Merge pull request #14 from feifanhe/master

Implement dirty check