Minor changes for Linux compatibility

Also:
* Renamed tools/declarations.py to tools/dgrep.py