Modified rename_levels.py to support comments and trailing whitespaces in Levels.yaml