avoid file write race condition at generating Proxy and Hydrator classes
Make HydratorException and ProxyException classes consistent
Merge pull request #662