add --shortname option and use it to appen performance data
fix potential division by zero error
Merge pull request #3 from gimpel/ab515b7cfd4f2e96b99e684c54aa9ffd0847bdd5

Fix potential division-by-zero, add optional perfdata via --shortname option
Added support for "sum" function for thresholds

The existing code assumes the user wants an average value for their
thresholds.

This code adds a "-f" option (function) where the user can choose
between "average" and "sum".
Merged support for function 'sum'