diff --git a/plugins/context/AlbumTab.py b/plugins/context/AlbumTab.py
index 5d32171..8dc3f7e 100644
--- a/plugins/context/AlbumTab.py
+++ b/plugins/context/AlbumTab.py
@@ -126,9 +126,9 @@ class AlbumView (GObject.GObject):
         self.path = rb.find_plugin_file (self.plugin, 'tmpl/album-tmpl.html')
         self.loading_path = rb.find_plugin_file (self.plugin, 'tmpl/loading.html')
         self.album_template = Template (filename = self.path,
-                                        module_directory = '/tmp/context')
+                                        module_directory = self.plugin.tempdir)
         self.loading_template = Template (filename = self.loading_path, 
-                                          module_directory = '/tmp/context')
+                                          module_directory = self.plugin.tempdir)
         self.styles = self.basepath + '/tmpl/main.css'
 
     def album_list_ready (self, ds):
diff --git a/plugins/context/ArtistTab.py b/plugins/context/ArtistTab.py
index daa6027..40a0fd1 100644
--- a/plugins/context/ArtistTab.py
+++ b/plugins/context/ArtistTab.py
@@ -123,8 +123,8 @@ class ArtistView (GObject.GObject):
     def load_tmpl (self):
         self.path = rb.find_plugin_file(self.plugin, 'tmpl/artist-tmpl.html')
         self.loading_path = rb.find_plugin_file (self.plugin, 'tmpl/loading.html')
-        self.template = Template (filename = self.path, module_directory = '/tmp/context/')
-        self.loading_template = Template (filename = self.loading_path, module_directory = '/tmp/context')
+        self.template = Template (filename = self.path, module_directory = self.plugin.tempdir)
+        self.loading_template = Template (filename = self.loading_path, module_directory = self.plugin.tempdir)
         self.styles = self.basepath + '/tmpl/main.css'
 
     def connect_signals (self):
diff --git a/plugins/context/LinksTab.py b/plugins/context/LinksTab.py
index 326024a..836d6df 100644
--- a/plugins/context/LinksTab.py
+++ b/plugins/context/LinksTab.py
@@ -107,7 +107,7 @@ class LinksView (GObject.GObject):
         self.images = self.basepath + '/img/links/'
         self.styles = self.basepath + '/tmpl/main.css'
         self.template = Template (filename = self.path, 
-                                  module_directory = '/tmp/context/')
+                                  module_directory = self.plugin.tempdir)
 
         self.file = self.template.render (error      = ds.get_error (),
                                           artist     = ds.get_artist(),
diff --git a/plugins/context/LyricsTab.py b/plugins/context/LyricsTab.py
index 96b44c4..232a230 100644
--- a/plugins/context/LyricsTab.py
+++ b/plugins/context/LyricsTab.py
@@ -111,9 +111,9 @@ class LyricsView (GObject.GObject):
         self.path = rb.find_plugin_file(self.plugin, 'tmpl/lyrics-tmpl.html')
         self.loading_path = rb.find_plugin_file (self.plugin, 'tmpl/loading.html')
         self.template = Template (filename = self.path, 
-                                  module_directory = '/tmp/context/')
+                                  module_directory = self.plugin.tempdir)
         self.loading_template = Template (filename = self.loading_path, 
-                                          module_directory = '/tmp/context')
+                                          module_directory = self.plugin.tempdir)
         self.styles = self.basepath + '/tmpl/main.css'
 
     def lyrics_ready (self, ds, entry, lyrics):
diff --git a/plugins/context/context.py b/plugins/context/context.py
index 7fe2f2a..3471956 100644
--- a/plugins/context/context.py
+++ b/plugins/context/context.py
@@ -26,6 +26,10 @@
 
 # vim:shiftwidth=4:softtabstop=4:expandtab
 
+from tempfile import mkdtemp
+from os.path import isdir
+from shutil import rmtree
+
 import ContextView as cv
 
 from gi.repository import GObject, Peas
@@ -34,13 +38,17 @@ from gi.repository import RB
 class ContextPlugin(GObject.Object, Peas.Activatable):
     __gtype_name__ = 'ContextPlugin'
     object = GObject.property(type=GObject.Object)
+    tempdir = None
 
     def __init__ (self):
         GObject.Object.__init__ (self)
 
     def do_activate (self):
+        self.tempdir = mkdtemp(prefix = 'rb-context')
         self.context_view = cv.ContextView (self.object, self)
 
     def do_deactivate(self):
         self.context_view.deactivate(self.object)
         del self.context_view
+        if (isdir(self.tempdir)):
+            rmtree(self.tempdir)
