diff --git a/jekyll_new_post.py b/jekyll_new_post.py
index a9ba992..d730f11 100755
--- a/jekyll_new_post.py
+++ b/jekyll_new_post.py
@@ -38,7 +38,8 @@ def hash_file(filename: Path) -> str:
 def perform_commit(filepath: Path, title: str=None,
                    draft: bool=False) -> None:
 
-    repo = Repo("./")  # FIXME
+    import os
+    repo = Repo(os.curdir)  # FIXME
     repo.index.add(str(filepath))
 
     if not draft:
@@ -86,7 +87,7 @@ def create_new_post(title: str, categories: list=None, tags: list=None,
     else:
         final_path = Path("_drafts") / filename
 
-    with tempfile.NamedTemporaryFile(mode="wt") as temp:
+    with tempfile.NamedTemporaryFile(mode="wt", suffix=".md") as temp:
 
         temp_path = Path(temp.name)
 
@@ -147,4 +148,4 @@ def main():
 
 
 if __name__ == "__main__":
-    main()
\ No newline at end of file
+    main()