Changed profile/base path and added flag 'p' to mkdir to allow to create dirs under non existant directories