Fixed handling system includes.

Fixed a bug which would incorrectly rewrite the system includes to the
base of the project.