-guiset statuspanel top-left
+guiset statuspanel top-right
 set newtab file:///opt/firefox/blank.html
+autocmd DocStart www.reddit.com urlmodify -t www old
 
 #!/bin/sh
 set -e
 
+basedir="/home/plom/mail/maildir/"
+# Ensure directories exist for all "dir:*" tags.
+for tag in $(notmuch search --output=tags '*'); do
+    if [ ! $(echo "${tag}" | cut -c-4) = "dir:" ]; then
+        continue
+    fi
+    target_dir="${basedir}"$(echo "${tag}" | cut -c5-)"/cur/"
+    if [ ! -d "${target_dir}" ]; then
+        echo "Directory ${target_dir} does not exist."
+        exit 1
+    fi
+done
+
 # Ensure all "dir:*"-tagged mails are in proper directories,
 # remove all "dir:*" tags.
-basedir="/home/plom/mail/maildir/"
 for tag in $(notmuch search --output=tags '*'); do
     if [ ! $(echo "${tag}" | cut -c-4) = "dir:" ]; then
         continue