use sphinx.package_dir to find texinputs

this can be different for debian installs, etc.
add `--interaction=batchmode` to pdflatex call

avoids waiting for input
Merge pull request #3948 from minrk/sphinx-dir

Sphinx and PDF tweaks for nbconvert:

- add `--interaction=batchmode` to pdflatex call to avoid waiting for interactive input.

- use sphinx.package_dir to find texinputs directory regardless of on-disk location.

Closes #3894.