Refactor code

Instead of a giant if condition, refactor code to use a goto for the
termination condition.
Add support for application directories

As for the new XDG spec.
update: support moving the old directories entirely

If xdg-user-dirs-update is recent enough, call it with the --move
parameter, to make sure we don't leave old directories behind.
Add gsettings for showing confirmation dialog and moving files

Preserve the current defaults this way.