Allow libraries/sketches to have the same name as system libs

e.g. main or Wire

Doesn't seem to work with main.cpp but main.ino works.

Fixes issue #229 and #244

Please don't merge until people have tested/commented on #244