Fix #209 dev:console, refactored to allow to call detectMagento without init()