Support composer and fix some PSR-0 bugs

There were a few bugs I discovered while I was implementing composer.