fix assert_directory returns 'nil' instead of owner/group of the directory

Tested and verified to fix Issue #4