Update scripts in tools/

Some minor updates to the scripts in the tools directory.