Better detect install location

Hi Tibor,

this one depends on [invenio:ticket#1334](http://invenio-software.org/ticket/1334)