unix: check directories exist, catch Unix errors, generally improve logging

Signed-off-by: David Scott <dave.scott@eu.citrix.com>