Adding check for null cursor and invalid column index in getRealPathFromContentURI() method. Fixes #584.