Merge tag '0.5.1' into develop

Released-0.5.1 0.5.1
make sure the parent directory is created when writing an image
bumped version
Merge branch 'release/0.5.2'