Catered for edge case where user leaves trailing forwardslash or backsla...

...sh in path and appcmd borks.