Adds parameter exists check and test coverage.

Modifies test_append_parameter to us in_line writes.
Changes assertion method.
Adds assertion for duplicate parameter.