Adding the mkdir command if necessary