Fixes MAKEDIRECTORY calculation