Added open cursor check. If cursor is closed it is swapped to  null to be safe.
Merge pull request #8 from twotoasters/chris-open-cursor-check

Added open cursor check. If cursor is closed it is swapped to  null to be safe.