TODO for the nearest future: - Add proper debugging facilities. - Create a more generic way of mapping a pathname to a file. There are some path lookups we'd like to be able to run more than once. - When calling open, buffer the file descriptors, so we don't open them each time, and just read from the filedescriptor. - Make some way for the lookup functions to see more than just one field from the SQL row (eg. we need to create paths like "artist - song") - Escaping string: when querying sqlite, replace ' with '' in ingoing strings. (why isn't this done in the API?)