Added helper function to write files atomically in PHPD
New release
Merge branch 'release/v0.1.2'