Gracefully handle making nested directories for output