Check properly for quoted variables when deciding on pointlessness

Submitted by:	bdrewery
pep8 style fixes
Fix likely typos
Fix style fix (tmp.value != False should be tmp.value)

Pointyhat to:	eadler

Fix pointless quoting for real this time (used to detect the quotes at the
beginning and end of the value)

Noticed by:	bdrewery
Actually check shebang