Fixes #584

Adding check for null cursor and invalid column index in getRealPathFrom ContentURI() method. .