Lib path relative to dist dir (v2)

Second version of PR #4, after splitting a commit into two and reworking the commit message a little. See rationale on #4.