HPCC-12047 String repad causes seg fault on -ve lengths

Additional check for invalid parameter

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>