add nil check for filename in detect-virtualenv, which can happen if we're editing python in a temporary buffer