resolves #1526
consolidate printonly check for #1526
remove extra else
made more readable
Merge pull request #1528 from audy/dont-mkdir-on-printonly

resolves #1526