Python Create Executable Shell Script If Variable Not Defined