Avoid negative repetition counts (5.22 compatibility)

Perl 5.22 will warn when the "x" operator is passed a negative
repetition count.  Warnings-proof the code by ensuring that strings are
not repeated a negative number of times.
Merge pull request #20 from alexmv/negative-repeats

Avoid negative repetition counts (5.22 compatibility)