resolve relative urls correctly - fixes issue #25