Fix parsing of relative path if it contains the project name more than once.

Fixes issue #39.