rake: fixed parameter stripping

At some point (4.x?), Bash changed interpretation of '[' inside
replacement pattern expressions, and now you have to use '\[' to achieve
the desired effect. But since we're just stripping a suffix rather than
replacing it (7e957bee), let's also just use the %% operator.