Fix: console errors when max is set to 0

Error: Invalid value for <path> attribute d="M NaN NaN A 80 80 0 0 0 84 4" jquery.js:6958

Fix for error caused by having a max value = 0.
there are certain use cases (where the progress bar could start from a 0/0 position.

Added: a simple check to see if total was 0, if so set perc to 0 to avoid divide by 0 error 
(assume that was what was causing the js console to explode with redness)