Avoid crash in module_common when the file cannot be moved/copy

Avoid the following Crash when file cannot be moved/copied in lineinfile module.

invalid output was: Traceback (most recent call last):
  File "/home/kk/.ansible/tmp/ansible-1369793563.52-51180351954149/lineinfile", line 1218, in <module>
    main()
  File "/home/kk/.ansible/tmp/ansible-1369793563.52-51180351954149/lineinfile", line 318, in main
    ins_aft, ins_bef, create, backup, backrefs)
  File "/home/kk/.ansible/tmp/ansible-1369793563.52-51180351954149/lineinfile", line 239, in present
    write_changes(module, lines, dest)
  File "/home/kk/.ansible/tmp/ansible-1369793563.52-51180351954149/lineinfile", line 139, in write_changes
    module.atomic_move(tmpfile, dest)
  File "/home/kk/.ansible/tmp/ansible-1369793563.52-51180351954149/lineinfile", line 1147, in atomic_move
    cleanup(tmp_dest)
NameError: global name 'cleanup' is not defined