Switch occurrences "if err" to "if err != ENOERR".

Greg had pointed out in his review of my patch for the function exists() that it
is better to use the interface instead of assuming that 0 means there is no
error.  Fixing this in other places.
Merge pull request #657 from lydia-duncan/fixErrorComparisons

Switch occurrences "if err" to "if err != ENOERR". [not reviewed]

Greg had pointed out in his review of my patch for the function exists() that it
is better to use the interface instead of assuming that 0 means there is no
error. Fixing this in other places.