Fixed python3 compat (usage of string.strip)