Improve command_interpreter detection

Adds support for `#!/usr/bin/env ruby` style interpreters