     if not defaultTabName
       newTabname = null
     else
+      {basename, extname} = require 'path'
+
       fileName = atom.workspace.getActiveTextEditor().getFileName().toString()
       fileExt = extname(fileName)
       fileBase = basename(fileName, fileExt)

  counter: 0

  activate: (state) ->
    # Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
    #
    @subscriptions = new CompositeDisposable

# Kudos http://stackoverflow.com/a/17606289
String::replaceAll = (search, replacement) ->
  target = this
  target.replace new RegExp(search, 'g'), replacement

