Zero values should be treated as invalid when parsing envvars

Because I'm lazy and strtol's error reporting is stupid.
Add test for envvar parsing