Added a Hamming distance function that pads.

So that the hamming distance can be found between two strings with
different lengths.