Compilation fails when 'dest' path doesn't end with '/'. Fixes #1139