Removed unnecessary import.
Create the output directories if they don't exist.