resolves #690 resolve relative paths relative to base_dir in unsafe mode