Lightweight class which allows substitute PHP streams