fixed links in sub-URI installations

Some links doesn't work if redmine is installed in sub-URI like http://example.com/redmine. This commit fixes those links. Issues #125, #115 and #97 seems related.