derive pathInWindow from path and windowPath (fixes #5)