Fixed problem of getEditEvent sometimes returning None
Fixed temp directory so deleted after use