build percept2 with rebar

This change allows percept2 to be built using rebar. Like the autotools installatoin it support installation on the erlang system.


This change is needed to ease the use of percept2 in erlang embedded releases.