Fixed method to create a folder hiearchy and moved method to FileHelper.
Added test.
Fixes issue #163.