Fix panic on short relpath

if filepath.RelPath returns a short string, the code would panic.