Make platform completely independent of core

Remove the remaining uses of DFError from platform, as well as other
helper functions like DFAppendPathComponent. This has the (minor)
disadvantage that we have to do things like path appending manually -
and potentially other things in the future if they're added to platform
- but does mean that platform can be compiled & tested independently.

In place of DFError, we now just pass a pointer to a string which, if an
error occurs, will be set by a given function to the text of the error
message.