Added directory checking for documentation builds, and corrected for Windows pathing
Merge pull request #3477 from kastnerkyle/docbuild_fix

[MRG] Docbuild fixes for #3475