fix latex backend for files without modules

@traiansf please review.

Fixes #231.