created mkdir module to extend the modularity of this

* improved error handling in the core
* migrating to more modular components for fs and cert logic