fix signrequest, use foldermap to pass in ca, fix tests