nmap-import: Use safe method to access dict

Stepped on this bug while importing nmap xml file ended up in
a python keyerror.

Solved by first check if cpe exists through dict.get() as safe method.
Merge pull request #81 from andurin/fixes

nmap-import: Use safe method to access dict
Fix CPE Import Backgroundtask - UnboundLocalError

It should be imported before use :)

This fixes following:
<type 'exceptions.UnboundLocalError'> local variable 'connect_exploits' referenced before assignment

Traceback (most recent call last):
  File "/opt/kvasir/web2py/gluon/restricted.py", line 220, in restricted
    exec ccode in environment
  File "/opt/kvasir/web2py/applications/test/controllers/exploits.py", line 264, in <module>
  File "/opt/kvasir/web2py/gluon/globals.py", line 389, in <lambda>
    self._caller = lambda f: f()
  File "/opt/kvasir/web2py/gluon/tools.py", line 3337, in f
    return action(*a, **b)
  File "/opt/kvasir/web2py/applications/test/controllers/exploits.py", line 131, in connect_exploits
    connect_exploits,
UnboundLocalError: local variable 'connect_exploits' referenced before assignment
Merge pull request #82 from andurin/fixes

Fix CPE Import Backgroundtask - UnboundLocalError, thanks @andurin