Bug fix: infinite loop

Running Pandown on a file that was not part of a project could lead to
an infinite loop. Fixed.