public function createDirectory($path, $label = 'path')
{
$umask = umask(0);
$permission = 0755;
if (!mkdir($path, $permission, true)) {
throw new Exception(sprintf('Could not create the %s at %s', $label, $path));
}
chmod($path, $permission);
umask($umask);
}