added function mkdir_p which simulate mkdir -p command