PHP command line script to regenerate a text file