diff --git a/data/example/index.html b/data/example/index.html
--- a/data/example/index.html
+++ b/data/example/index.html
@@ -13,4 +13,4 @@
 <h2>Posts</h2>
 $partial("templates/post-list.html")$
 
-<p>…or you can find more in the <a href="/archive.html">archives</a>.
+<p>…or you can find more in the <a href="/archive.html">archives</a>.</p>
diff --git a/hakyll.cabal b/hakyll.cabal
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -1,5 +1,5 @@
 Name:    hakyll
-Version: 4.5.1.0
+Version: 4.5.2.0
 
 Synopsis: A static website compiler library
 Description:
diff --git a/src/Hakyll/Core/Compiler/Internal.hs b/src/Hakyll/Core/Compiler/Internal.hs
--- a/src/Hakyll/Core/Compiler/Internal.hs
+++ b/src/Hakyll/Core/Compiler/Internal.hs
@@ -248,5 +248,6 @@
 compilerGetMatches pattern = do
     universe <- compilerUniverse <$> compilerAsk
     let matching = filterMatches pattern $ S.toList universe
-    compilerTellDependencies [PatternDependency pattern matching]
+        set'     = S.fromList matching
+    compilerTellDependencies [PatternDependency pattern set']
     return matching
diff --git a/src/Hakyll/Core/Dependencies.hs b/src/Hakyll/Core/Dependencies.hs
--- a/src/Hakyll/Core/Dependencies.hs
+++ b/src/Hakyll/Core/Dependencies.hs
@@ -32,7 +32,7 @@
 
 --------------------------------------------------------------------------------
 data Dependency
-    = PatternDependency Pattern [Identifier]
+    = PatternDependency Pattern (Set Identifier)
     | IdentifierDependency Identifier
     deriving (Show, Typeable)
 
@@ -91,7 +91,7 @@
     return $ concatMap dependenciesFor' $ fromMaybe [] $ M.lookup id' facts
   where
     dependenciesFor' (IdentifierDependency i) = [i]
-    dependenciesFor' (PatternDependency _ is) = is
+    dependenciesFor' (PatternDependency _ is) = S.toList is
 
 
 --------------------------------------------------------------------------------
@@ -116,7 +116,7 @@
     go _   ds (IdentifierDependency i) = return $ IdentifierDependency i : ds
     go id' ds (PatternDependency p ls) = do
         universe <- ask
-        let ls' = filterMatches p universe
+        let ls' = S.fromList $ filterMatches p universe
         if ls == ls'
             then return $ PatternDependency p ls : ds
             else do
diff --git a/src/Hakyll/Core/Metadata.hs b/src/Hakyll/Core/Metadata.hs
--- a/src/Hakyll/Core/Metadata.hs
+++ b/src/Hakyll/Core/Metadata.hs
@@ -12,6 +12,7 @@
 import           Control.Monad                  (forM)
 import           Data.Map                       (Map)
 import qualified Data.Map                       as M
+import qualified Data.Set                       as S
 
 
 --------------------------------------------------------------------------------
@@ -60,4 +61,4 @@
 makePatternDependency :: MonadMetadata m => Pattern -> m Dependency
 makePatternDependency pattern = do
     matches' <- getMatches pattern
-    return $ PatternDependency pattern matches'
+    return $ PatternDependency pattern (S.fromList matches')
diff --git a/src/Hakyll/Core/Provider/Internal.hs b/src/Hakyll/Core/Provider/Internal.hs
--- a/src/Hakyll/Core/Provider/Internal.hs
+++ b/src/Hakyll/Core/Provider/Internal.hs
@@ -31,8 +31,7 @@
 import           Data.Monoid            (mempty)
 import           Data.Set               (Set)
 import qualified Data.Set               as S
-import           Data.Time              (Day (..), UTCTime (..),
-                                         secondsToDiffTime)
+import           Data.Time              (Day (..), UTCTime (..))
 import           Data.Typeable          (Typeable)
 import           System.Directory       (getModificationTime)
 import           System.FilePath        (addExtension, (</>))
@@ -62,11 +61,11 @@
 --------------------------------------------------------------------------------
 instance Binary BinaryTime where
     put (BinaryTime (UTCTime (ModifiedJulianDay d) dt)) =
-        put d >> put (floor dt :: Integer)
+        put d >> put (toRational dt)
 
     get = fmap BinaryTime $ UTCTime
         <$> (ModifiedJulianDay <$> get)
-        <*> (secondsToDiffTime <$> get)
+        <*> (fromRational <$> get)
 
 
 --------------------------------------------------------------------------------
diff --git a/src/Hakyll/Core/UnixFilter.hs b/src/Hakyll/Core/UnixFilter.hs
--- a/src/Hakyll/Core/UnixFilter.hs
+++ b/src/Hakyll/Core/UnixFilter.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
 --------------------------------------------------------------------------------
 -- | A Compiler that supports unix filters.
 module Hakyll.Core.UnixFilter
@@ -19,7 +21,6 @@
 import           System.IO               (Handle, hClose, hFlush, hGetContents,
                                           hPutStr, hSetEncoding, localeEncoding)
 import           System.Process
-import qualified System.Info             as System
 
 --------------------------------------------------------------------------------
 import           Hakyll.Core.Compiler
@@ -105,17 +106,19 @@
              -> i
              -> IO (o, String, ExitCode)
 unixFilterIO writer reader programName args input = do
-    -- The problem on Windows is that `proc` is that it is unable to execute
+    -- The problem on Windows is that `proc` is unable to execute
     -- batch stubs (eg. anything created using 'gem install ...') even if its in
     -- `$PATH`. A solution to this issue is to execute the batch file explicitly
     -- using `cmd /c batchfile` but there is no rational way to know where said
     -- batchfile is on the system. Hence, we detect windows using the
-    -- `System.Info` module and then instead of using `proc` to create the
-    -- process, use `shell` instead which will be able to execute everything
-    -- `proc` can, and this can deal with batch files as well.
-    let pr = if System.os == "mingw32"
-                 then shell $ unwords (programName : args)
-                 else proc programName args
+    -- CPP and instead of using `proc` to create the process, use `shell`
+    -- which will be able to execute everything `proc` can
+    -- as well as batch files.
+#ifdef mingw32_HOST_OS
+    let pr = shell $ unwords (programName : args)
+#else
+    let pr = proc programName args
+#endif
 
     (Just inh, Just outh, Just errh, pid) <-
         createProcess pr
diff --git a/src/Hakyll/Web/Html.hs b/src/Hakyll/Web/Html.hs
--- a/src/Hakyll/Web/Html.hs
+++ b/src/Hakyll/Web/Html.hs
@@ -124,6 +124,7 @@
     emptyException x  = x
     relevant "."      = False
     relevant "/"      = False
+    relevant "./"     = False
     relevant _        = True
 
 
diff --git a/src/Hakyll/Web/Paginate.hs b/src/Hakyll/Web/Paginate.hs
--- a/src/Hakyll/Web/Paginate.hs
+++ b/src/Hakyll/Web/Paginate.hs
@@ -15,6 +15,7 @@
 import           Data.List                      (unfoldr)
 import qualified Data.Map                       as M
 import           Data.Monoid                    (mconcat)
+import qualified Data.Set                       as S
 import           Text.Printf                    (printf)
 
 
@@ -58,7 +59,7 @@
                 "invalid page number: " ++ show pn
 
     return $ Paginate pagPages pagPlaces makeId
-        (PatternDependency pattern idents)
+        (PatternDependency pattern (S.fromList idents))
 
 
 --------------------------------------------------------------------------------
@@ -81,7 +82,7 @@
             [(makeId i, i) | i <- [1 .. nPages]]
 
     return $ Paginate (M.fromList paginatePages') (M.fromList pagPlaces') makeId
-        (PatternDependency pattern idents)
+        (PatternDependency pattern (S.fromList idents))
 
 
 --------------------------------------------------------------------------------
diff --git a/src/Hakyll/Web/Tags.hs b/src/Hakyll/Web/Tags.hs
--- a/src/Hakyll/Web/Tags.hs
+++ b/src/Hakyll/Web/Tags.hs
@@ -71,6 +71,7 @@
 import           Data.Maybe                      (catMaybes, fromMaybe)
 import           Data.Monoid                     (mconcat)
 import           Data.Ord                        (comparing)
+import qualified Data.Set                        as S
 import           System.FilePath                 (takeBaseName, takeDirectory)
 import           Text.Blaze.Html                 (toHtml, toValue, (!))
 import           Text.Blaze.Html.Renderer.String (renderHtml)
@@ -124,7 +125,8 @@
 buildTagsWith f pattern makeId = do
     ids    <- getMatches pattern
     tagMap <- foldM addTags M.empty ids
-    return $ Tags (M.toList tagMap) makeId (PatternDependency pattern ids)
+    let set' = S.fromList ids
+    return $ Tags (M.toList tagMap) makeId (PatternDependency pattern set')
   where
     -- Create a tag map for one page
     addTags tagMap id' = do
@@ -148,8 +150,8 @@
 tagsRules :: Tags -> (String -> Pattern -> Rules ()) -> Rules ()
 tagsRules tags rules =
     forM_ (tagsMap tags) $ \(tag, identifiers) ->
-        create [tagsMakeId tags tag] $
-            rulesExtraDependencies [tagsDependency tags] $
+        rulesExtraDependencies [tagsDependency tags] $
+            create [tagsMakeId tags tag] $
                 rules tag $ fromList identifiers
 
 
diff --git a/tests/Hakyll/Core/Dependencies/Tests.hs b/tests/Hakyll/Core/Dependencies/Tests.hs
--- a/tests/Hakyll/Core/Dependencies/Tests.hs
+++ b/tests/Hakyll/Core/Dependencies/Tests.hs
@@ -38,7 +38,8 @@
     , ("posts/02.md",
         [])
     , ("index.md",
-        [ PatternDependency "posts/*" ["posts/01.md", "posts/02.md"]
+        [ PatternDependency "posts/*"
+            (S.fromList ["posts/01.md", "posts/02.md"])
         , IdentifierDependency "posts/01.md"
         , IdentifierDependency "posts/02.md"
         ])
diff --git a/tests/Hakyll/Web/Html/Tests.hs b/tests/Hakyll/Web/Html/Tests.hs
--- a/tests/Hakyll/Web/Html/Tests.hs
+++ b/tests/Hakyll/Web/Html/Tests.hs
@@ -59,6 +59,8 @@
         , "."     @=? toSiteRoot "index.html"
         , "."     @=? toSiteRoot "/index.html"
         , "../.." @=? toSiteRoot "foo/bar/qux"
+        , ".."    @=? toSiteRoot "./foo/bar.html"
+        , ".."    @=? toSiteRoot "/foo/./bar.html"
         ]
 
     , fromAssertions "isExternal"
