io: add isFile

This function will check whether the given path is a regular file.