adapted FileUtils:preparedirs from yaafe.io for windows