Optimize grabbing of first char
Fix a few bugs, fixes #1867
Added "pre-autoload-dump" event.

This event is fired before the autoload file is generated, for either
an install or update command.
Merge pull request #1871 from taylorotwell/master

Added "pre-autoload-dump" event.