For issue #440 added a mkdir for $VAR_DIR/output if dir does not exist