added function which simulates mkdir -p command
Added code to sync selective directories