Resolve relative paths at middleware setup

fixes #15