fix relative path issue (including when using named html file)