strip newline when reading uname -r output

Without this change, the linux headers package installation fails.