Added an option to create intermediate directory, leading to the db instance