improved handling of relative paths