Add .cgi as an extension for Python and Bash

This PR adds .cgi as an extension for both Python and Bash.
The issue was reported by @plaidfluff in #1504.