General purpose PHP class to work with strings and files