merge over rebar2 PR #401

Pulling in https://github.com/rebar/rebar/pull/401/files