Update SrmFunctions.psm1

Improved some pipeline handling