strip trailing spaces when reading autogen.input/lastrun

Change-Id: I9d47d2d4c6d2eb14968bfd79ef2a406c57afa21d