[build.py][s]: tweaks to handle bad input better.