Prevent /target and /test from being commited.
Fixed compilation error (JDK1.7 on Mac OSX).