Added Utility function Test-PSCredential

Tests a PSCredential