Remove leading directory components from a path, such as tar's --strip-components option