Start to improve handling of local/global files
Make /rest/getbook work the way it should