     path.join @getCachePath(), "#{login}-#{Date.now()}"
 
   cachedAvatar: (login, callback) ->
-    glob ?= require 'glob'
     glob @avatarGlob(login), (err, files) =>
       return callback(err) if err
       files.sort().reverse()

fs = require 'fs-plus'
path = require 'path'

glob = null    # defer until used
request = null # defer until used
DefaultRequestHeaders = {'User-Agent': navigator.userAgent}

module.exports =
class AtomIoClient

      callback(null, null)
    else
      imagePath = @avatarPath login
      requestObject = {
        url: "https://avatars.githubusercontent.com/#{login}"
        headers: {'User-Agent': navigator.userAgent}
      }
      request.head requestObject, (error, response, body) ->
        if error? or response.statusCode isnt 200 or not response.headers['content-type'].startsWith('image/')
