Added function to create flag-directories