Fix passing kwarg values '|' and '#'

Due to the fact that CLI kwargs for module execution functions are
passed through yaml.safe_load, certain values get mangled. This fixes
two such values. More commits like this may arise as other cases are
found. Fixes #6752.
Merge pull request #6754 from terminalmage/issue6752

Fix passing kwarg values '|' and '#'