Python Create Executable Shell Script If Variable Not Declared