bottle: write to relative path if exists.