Update LibSVM format script to avoid divide by zero