Fix leo_mem_check() return value and leo() checks.

Previously leo_mem_check() was not returning the documented value, and
leo() was erroring on uninitialized memory files.

This commit fixes both issues by inverting the return value of
leo_mem_check() and restructuring the return value checking done in
leo().