Fix packing order on creating standalone executable

Modules should be placed before main (content of gist.rb) because gist.rb try
to require 'gist/manpage' and 'gist/version', and fail if modules are not
defined.

This patch ensure that the modules are placed before main in standalone file
by seeking module directory first.