Your plugin approach is a good one, thanks for sharing!
If finally figured out how to achieve pcdtr integration! The problem that remained was the $_SESSION variables set in class.php which could not be retrieved by external png.php and css.php. The class.php itself is included into MODx context (index.php) and stores its data in that session, the other 2 can’t do that.
Text, path and css parameters are shared between scripts through $_SESSION variables. This is the reason you kept seeing your old example text, new values set in a different context have no effect.
In order to gain access to those variables you need to call startCMSSession() in the beginning of those external php files, read
here for more info.
PS: This is untested since I took a different approach before. Currently I use pcdtr working by similating png.php and css.php files through friendly urls and MODx documents. This approach has many problems, most importantly with path settings. Use the startCMSSession approach instead and all your trouble should go away.