relpath() doesn't handle "." in the path properly, so normalize the path before passing it to relpath()