Create work and output directories if they don't exist.