autogen: fix script to allow relative paths