Fix for script-detect issue

This version only patches a code that wasn't able to check whether self
running script was .exe or .rb

Nothing else has been updated.