Added support for options parameter in console.dir()

Solved issue: #5428. Now console.dir() accepts an optional parameter to define the maximum depth, colors and showHidden of the output.