cw.lua.in: simplify remove_dir_from_path