Trim trailing newlines from file-based envs

Many editors add a trailing newline to files. This can result in
slightly unexpected values for environment variables read from
/etc/container_environment.