file search fixed

exponential performance gains by using built-in comparison functions and
switching to file() instead of fopen()/fgets()