Check for output directory before attempting to create

Quick little change to avoid an error message.