Moved 'findfile()' to io module

Also fixed  io.openfile() to not break if trying to append to a
non-existent file.