[director] Catch system errors when writing files

Added also a unit spec
[director] Use common Bosh::Exec::sh when extracting stemcell

Added also unit test
Merge pull request #103 from cloudfoundry/director_space

Catch system errors when writing a file - Fixes [#46398849] and [#45964327]