script: various little fixes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>