SERVER-8931 Do not display stack trace on invalid cd() and mkdir() commands

Validate user input for the cd() and mkdir() JavaScript functions
and use uassert (UserAssertion) on validation failures.  This will
be translated into a JavaScript exception (and so can be caught by
user code) and will not generate a stack trace.