Updated RPATH macro

Various fixes