Change relative path calculation to use path.relative