Added an isFileName parameter to CreateDirectory.