Rework Latex test for nbconvert Python API

Also, skip it if pandoc is not available - this was causing a test failure on our new Windows build bot.