Don't use colors with dir method

Hi, console.dir doesn't work with colors so I conditionally add color depending on the type of log statement. I also cleaned it up so it would pass JSHint. Great idea with the prefixes in the log, only thing missing is accurate line numbers!