Both inputs should be in the same format. If core_path doesn't work without the trailing slash, but the extension_directory does, that should probably be fixed (please create a bug ticket for this issue).

There is also a function that should be used when core and extension dirs are the same, you just send it one path and it sets that path on both (please use it).