Fixed setParam method and added test

The set param method was storing params in a multidimensional array.  When you document more than two params the last param showed in the docs along with one empty param.  I've changed this method to store the params in a flat array so that all show up in the docs.  There's a test included also.