add env.$rack_env.local and two parsing fixes

see commit messages…