add mkdir_p functionality