Fallback to synthesizing a debug-id from version and architecture, if possible

based on an idea by ivan.gubarev
Correctly make debug-file a basename when code-file has a windows-style path

Fix by ivan.gubarev