Added some range checks in the Phred score conversion functions