We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Toil is marking its inputs executable
I think that Toil is marking input files from the local disk executable. It is resulting in weird changes to the file permissions in my Git tree when I run Toil tests.



┆Issue is synchronized with this [Jira Story](https://ucsc-cgl.atlassian.net/browse/TOIL-1462)
┆Issue Number: TOIL-1462


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/toil/fileStores/__init__.py`
Content:
```
1 # Copyright (C) 2015-2021 Regents of the University of California
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 import os
15 import stat
16 from typing import Any
17 
18 
19 class FileID(str):
20     """
21     A small wrapper around Python's builtin string class.
22 
23     It is used to represent a file's ID in the file store, and has a size attribute
24     that is the file's size in bytes. This object is returned by importFile and
25     writeGlobalFile.
26 
27     Calls into the file store can use bare strings; size will be queried from
28     the job store if unavailable in the ID.
29     """
30 
31     def __new__(cls, fileStoreID: str, *args: Any) -> 'FileID':
32         return super().__new__(cls, fileStoreID)
33 
34     def __init__(self, fileStoreID: str, size: int, executable: bool = False) -> None:
35         # Don't pass an argument to parent class's __init__.
36         # In Python 3 we can have super(FileID, self) hand us object's __init__ which chokes on any arguments.
37         super().__init__()
38         self.size = size
39         self.executable = executable
40 
41     def pack(self) -> str:
42         """Pack the FileID into a string so it can be passed through external code."""
43         return f'{self.size}:{int(self.executable)}:{self}'
44 
45     @classmethod
46     def forPath(cls, fileStoreID: str, filePath: str) -> 'FileID':
47         executable = os.stat(filePath).st_mode & stat.S_IXUSR != 0
48         return cls(fileStoreID, os.stat(filePath).st_size, executable)
49 
50     @classmethod
51     def unpack(cls, packedFileStoreID: str) -> 'FileID':
52         """Unpack the result of pack() into a FileID object."""
53         # Only separate twice in case the FileID itself has colons in it
54         vals = packedFileStoreID.split(':', 2)
55         # Break up the packed value
56         size = int(vals[0])
57         executable = bool(vals[1])
58         value = vals[2]
59         # Create the FileID
60         return cls(value, size, executable)
61
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/toil/fileStores/__init__.py b/src/toil/fileStores/__init__.py
--- a/src/toil/fileStores/__init__.py
+++ b/src/toil/fileStores/__init__.py
@@ -40,7 +40,7 @@
 
     def pack(self) -> str:
         """Pack the FileID into a string so it can be passed through external code."""
-        return f'{self.size}:{int(self.executable)}:{self}'
+        return f'{self.size}:{"1" if self.executable else "0"}:{self}'
 
     @classmethod
     def forPath(cls, fileStoreID: str, filePath: str) -> 'FileID':
@@ -54,7 +54,7 @@
         vals = packedFileStoreID.split(':', 2)
         # Break up the packed value
         size = int(vals[0])
-        executable = bool(vals[1])
+        executable = (vals[1] == "1")
         value = vals[2]
         # Create the FileID
         return cls(value, size, executable)

{"golden_diff": "diff --git a/src/toil/fileStores/__init__.py b/src/toil/fileStores/__init__.py\n--- a/src/toil/fileStores/__init__.py\n+++ b/src/toil/fileStores/__init__.py\n@@ -40,7 +40,7 @@\n \n     def pack(self) -> str:\n         \"\"\"Pack the FileID into a string so it can be passed through external code.\"\"\"\n-        return f'{self.size}:{int(self.executable)}:{self}'\n+        return f'{self.size}:{\"1\" if self.executable else \"0\"}:{self}'\n \n     @classmethod\n     def forPath(cls, fileStoreID: str, filePath: str) -> 'FileID':\n@@ -54,7 +54,7 @@\n         vals = packedFileStoreID.split(':', 2)\n         # Break up the packed value\n         size = int(vals[0])\n-        executable = bool(vals[1])\n+        executable = (vals[1] == \"1\")\n         value = vals[2]\n         # Create the FileID\n         return cls(value, size, executable)\n", "issue": "Toil is marking its inputs executable\nI think that Toil is marking input files from the local disk executable. It is resulting in weird changes to the file permissions in my Git tree when I run Toil tests.\n\n\n\n\u2506Issue is synchronized with this [Jira Story](https://ucsc-cgl.atlassian.net/browse/TOIL-1462)\n\u2506Issue Number: TOIL-1462\n\n", "before_files": [{"content": "# Copyright (C) 2015-2021 Regents of the University of California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport os\nimport stat\nfrom typing import Any\n\n\nclass FileID(str):\n    \"\"\"\n    A small wrapper around Python's builtin string class.\n\n    It is used to represent a file's ID in the file store, and has a size attribute\n    that is the file's size in bytes. This object is returned by importFile and\n    writeGlobalFile.\n\n    Calls into the file store can use bare strings; size will be queried from\n    the job store if unavailable in the ID.\n    \"\"\"\n\n    def __new__(cls, fileStoreID: str, *args: Any) -> 'FileID':\n        return super().__new__(cls, fileStoreID)\n\n    def __init__(self, fileStoreID: str, size: int, executable: bool = False) -> None:\n        # Don't pass an argument to parent class's __init__.\n        # In Python 3 we can have super(FileID, self) hand us object's __init__ which chokes on any arguments.\n        super().__init__()\n        self.size = size\n        self.executable = executable\n\n    def pack(self) -> str:\n        \"\"\"Pack the FileID into a string so it can be passed through external code.\"\"\"\n        return f'{self.size}:{int(self.executable)}:{self}'\n\n    @classmethod\n    def forPath(cls, fileStoreID: str, filePath: str) -> 'FileID':\n        executable = os.stat(filePath).st_mode & stat.S_IXUSR != 0\n        return cls(fileStoreID, os.stat(filePath).st_size, executable)\n\n    @classmethod\n    def unpack(cls, packedFileStoreID: str) -> 'FileID':\n        \"\"\"Unpack the result of pack() into a FileID object.\"\"\"\n        # Only separate twice in case the FileID itself has colons in it\n        vals = packedFileStoreID.split(':', 2)\n        # Break up the packed value\n        size = int(vals[0])\n        executable = bool(vals[1])\n        value = vals[2]\n        # Create the FileID\n        return cls(value, size, executable)\n", "path": "src/toil/fileStores/__init__.py"}], "after_files": [{"content": "# Copyright (C) 2015-2021 Regents of the University of California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport os\nimport stat\nfrom typing import Any\n\n\nclass FileID(str):\n    \"\"\"\n    A small wrapper around Python's builtin string class.\n\n    It is used to represent a file's ID in the file store, and has a size attribute\n    that is the file's size in bytes. This object is returned by importFile and\n    writeGlobalFile.\n\n    Calls into the file store can use bare strings; size will be queried from\n    the job store if unavailable in the ID.\n    \"\"\"\n\n    def __new__(cls, fileStoreID: str, *args: Any) -> 'FileID':\n        return super().__new__(cls, fileStoreID)\n\n    def __init__(self, fileStoreID: str, size: int, executable: bool = False) -> None:\n        # Don't pass an argument to parent class's __init__.\n        # In Python 3 we can have super(FileID, self) hand us object's __init__ which chokes on any arguments.\n        super().__init__()\n        self.size = size\n        self.executable = executable\n\n    def pack(self) -> str:\n        \"\"\"Pack the FileID into a string so it can be passed through external code.\"\"\"\n        return f'{self.size}:{\"1\" if self.executable else \"0\"}:{self}'\n\n    @classmethod\n    def forPath(cls, fileStoreID: str, filePath: str) -> 'FileID':\n        executable = os.stat(filePath).st_mode & stat.S_IXUSR != 0\n        return cls(fileStoreID, os.stat(filePath).st_size, executable)\n\n    @classmethod\n    def unpack(cls, packedFileStoreID: str) -> 'FileID':\n        \"\"\"Unpack the result of pack() into a FileID object.\"\"\"\n        # Only separate twice in case the FileID itself has colons in it\n        vals = packedFileStoreID.split(':', 2)\n        # Break up the packed value\n        size = int(vals[0])\n        executable = (vals[1] == \"1\")\n        value = vals[2]\n        # Create the FileID\n        return cls(value, size, executable)\n", "path": "src/toil/fileStores/__init__.py"}]}