Fix: Invalid URLs generated when running under a subdir

Closes #400