Add support for custom finish handler

Execute a particular script when the build finishes.