Add an option to specify an optional base directory for relative links