Use ruby File methods rather than grep