Small fixes for IntelliJ compilation on Mac OS X

These patches introduce no functional changes but fix a build shell script compatibility with Mac OS X (its sed doesn't like the -- args separator) and stop IntelliJ from complaining on failed tests.