Fixed another import.
Creating outdir if it doesn't exist.