similar to os.path.relpath but uses blendfile path rather then the current working directory. Also use python exceptions rather then providing our own ones.