Index: fedd/access_to_abac.py
===================================================================
--- fedd/access_to_abac.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/access_to_abac.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -12,5 +12,5 @@
 from federation.fedid import fedid
 from federation.authorizer import abac_authorizer
-from federation.util import abac_split_cert, abac_pem_type
+from federation.util import abac_split_cert, abac_pem_type, file_expanding_opts
 
 
@@ -224,5 +224,5 @@
 
 
-class access_opts(OptionParser):
+class access_opts(file_expanding_opts):
     '''
     Parse the options for this program.  Most are straightforward, but the
@@ -247,10 +247,13 @@
 
     def __init__(self):
-	OptionParser.__init__(self, usage='%prog [opts] file [...]')
+	file_expanding_opts.__init__(self, usage='%prog [opts] file [...]')
 	self.add_option('--cert', dest='cert', default=None,
+		type='str', action='callback', callback=self.expand_file,
 		help='my fedid as an X.509 certificate')
 	self.add_option('--key', dest='key', default=None,
+		type='str', action='callback', callback=self.expand_file,
 		help='key for the certificate')
 	self.add_option('--dir', dest='dir', default=None,
+		type='str', action='callback', callback=self.expand_file,
 		help='Output directory for credentials')
 	self.add_option('--type', action='callback', nargs=1, type='str',
@@ -263,12 +266,14 @@
 		default=False,
 		help='Do not print credential to local attribute map')
-	self.add_option('--create-creds', action='store_true', 
+	self.add_option('--create_creds', action='store_true', 
 		dest='create_creds', default=False,
 		help='create credentials for rules.  Requires ' + \
 			'--cert, --key, and --dir to be given.')
 	self.add_option('--file', dest='file', default=None,
+		type='str', action='callback', callback=self.expand_file,
 		help='Access DB to parse.  If this is present, ' + \
 			'omit the positional filename')
 	self.add_option('--mapfile', dest='map', default=None,
+		type='str', action='callback', callback=self.expand_file,
 		help='File for the attribute to local authorization data')
 	self.add_option('--no-delegate', action='store_false', dest='delegate',
Index: fedd/cert_to_fedid.py
===================================================================
--- fedd/cert_to_fedid.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/cert_to_fedid.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -3,13 +3,14 @@
 import sys, os
 import subprocess, tempfile
+import os.path
 
 from string import join
-from optparse import OptionParser
-from federation.util import abac_pem_type, abac_split_cert
+from federation.util import abac_pem_type, abac_split_cert, file_expanding_opts
 
-class Parser(OptionParser):
+class Parser(file_expanding_opts):
     def __init__(self):
-	OptionParser.__init__(self, usage='%prog [options]')
+	file_expanding_opts.__init__(self, usage='%prog [options]')
 	self.add_option('--out', dest='out', help='destination file',
+		action='callback', callback=self.expand_file, type='str',
 		default='./cert.pem')
 	self.add_option('--debug', dest='debug', action='store_true', 
Index: fedd/confirm_sshkey.py
===================================================================
--- fedd/confirm_sshkey.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/confirm_sshkey.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -3,8 +3,8 @@
 import os, sys
 import MySQLdb
-from optparse import OptionParser
+from federation.util import file_expanding_opts
 
 
-class opt_parser(OptionParser):
+class opt_parser(file_expanding_opts):
     def __init__(self):
 	OptionParser.__init__(self, usage="%prog [opts] (--help for details)",
@@ -12,8 +12,9 @@
 	self.add_option('-u', '--user', dest='user', action='store',
 		default=None, help="User to confirm key of")
-	self.add_option('-f', '--keyfile', dest='keyfile', action='store',
+	self.add_option('-f', '--keyfile', dest='keyfile',
+		action='callback', callback=self.expand_file, type='str',
 		default=None, help="file containing pubkey to confirm")
-	self.add_option('-k', '--key', dest='key',
-		default=None, action='store',
+	self.add_option('-k', '--key', dest='key', default=None, 
+		action='callback', callback=self.expand_file, type='str',
 		help='Key on the command line')
 	self.add_option('-q', '--quiet', dest='verbose', action='store_false', 
Index: fedd/creddy_split.py
===================================================================
--- fedd/creddy_split.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/creddy_split.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -5,14 +5,15 @@
 import os
 
-from optparse import OptionParser
-from federation.util import abac_split_cert, abac_pem_type
+from federation.util import abac_split_cert, abac_pem_type, file_expanding_opts
 
 # Options
-class Parser(OptionParser):
+class Parser(file_expanding_opts):
     def __init__(self):
-	OptionParser.__init__(self, usage="%prog [options] file.pem")
+	file_expanding_opts.__init__(self, usage="%prog [options] file.pem")
 	self.add_option('--cert', dest='cert', default='./cert.pem', 
+		action='callback', callback=self.expand_file, type='str',
 		help='File to extract certificate into, default: [%default]')
 	self.add_option('--key', dest='key', default='./key.pem', 
+		action='callback', callback=self.expand_file, type='str',
 		help='File to extract key into, default: [%default]')
 	self.add_option('--force', action='store_true', dest='force',
Index: fedd/fedd.py
===================================================================
--- fedd/fedd.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -7,5 +7,5 @@
 from federation import config_parser
 from federation.server import server, xmlrpc_handler, soap_handler
-from federation.util import fedd_ssl_context
+from federation.util import fedd_ssl_context, file_expanding_opts
 from federation.deter_impl import new_feddservice
 
@@ -18,9 +18,12 @@
 import logging
 import M2Crypto
-
-class fedd_opts(OptionParser):
+import os.path
+
+class fedd_opts(file_expanding_opts):
     """Encapsulate option processing in this class, rather than in main"""
+
     def __init__(self):
-	OptionParser.__init__(self, usage="%prog [opts] (--help for details)",
+	file_expanding_opts.__init__(self, 
+		usage="%prog [opts] (--help for details)",
 		version="0.1")
 
@@ -29,7 +32,8 @@
 	self.add_option("-d", "--debug", action="count", dest="debug", 
 		help="Set debug.  Repeat for more information")
-	self.add_option("-f", "--configfile", action="store",
+	self.add_option("-f", "--configfile", action="callback",
+		callback=self.expand_file, type='str',
 		default="/usr/local/etc/fedd.conf",
-		dest="configfile", help="Configuration file (required)")
+		dest="configfile", help="Configuration file")
 	self.add_option("-l", "--logfile", action="store", dest="logfile", 
 		help="File to send log messages to")
Index: fedd/fedd_create.py
===================================================================
--- fedd/fedd_create.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_create.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -26,8 +26,10 @@
         client_opts.__init__(self)
         self.add_option("--experiment_cert", dest="out_certfile",
+		action="callback", callback=self.expand_file,
                 type="string", help="output certificate file")
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="Suggested experiment name")
-        self.add_option("--file", dest="file", 
+        self.add_option("--file", dest="file", action="callback",
+		callback=self.expand_file, type="str",
                 help="experiment description file")
         self.add_option("--project", action="store", dest="project", 
Index: fedd/fedd_ftopo.py
===================================================================
--- fedd/fedd_ftopo.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_ftopo.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -12,5 +12,6 @@
         client_opts.__init__(self)
         self.add_option("--experiment_cert", dest="exp_certfile",
-                type="string", help="experiment certificate file")
+		action='callback', callback=self.expand_file, type='str',
+                help="experiment certificate file")
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="human readable experiment name")
Index: fedd/fedd_image.py
===================================================================
--- fedd/fedd_image.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_image.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -17,8 +17,10 @@
         client_opts.__init__(self)
         self.add_option("--experiment_cert", dest="exp_certfile",
-                type="string", help="experiment certificate file")
+		action='callback', callback=self.expand_file, type='str',
+                help="experiment certificate file")
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="human readable experiment name")
-        self.add_option("--output", dest="outfile", type="string",
+        self.add_option("--output", dest="outfile",
+		action='callback', callback=self.expand_file, type='str',
                 help="output image file")
         self.add_option("--format", dest="format", type="choice", 
@@ -38,4 +40,5 @@
                 help="Size of output in pixels (diagrams are square")
         self.add_option("--file", dest="file", 
+		action='callback', callback=self.expand_file, type='str',
                 help="experiment description file")
 	self.add_option("--group", dest="group", action="append", default=[], 
Index: fedd/fedd_info.py
===================================================================
--- fedd/fedd_info.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_info.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -11,5 +11,6 @@
         client_opts.__init__(self)
         self.add_option("--experiment_cert", dest="exp_certfile",
-                type="string", help="experiment certificate file")
+		action='callback', callback=self.expand_file, type='str',
+                help="experiment certificate file")
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="human readable experiment name")
Index: fedd/fedd_new.py
===================================================================
--- fedd/fedd_new.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_new.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -14,5 +14,6 @@
         client_opts.__init__(self)
         self.add_option("--experiment_cert", dest="out_certfile",
-                type="string", help="output certificate file")
+		action='callback', callback=self.expand_file, type='str',
+                help="output certificate file")
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="Suggested experiment name")
Index: fedd/fedd_ns2topdl.py
===================================================================
--- fedd/fedd_ns2topdl.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_ns2topdl.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -12,4 +12,5 @@
         client_opts.__init__(self)
         self.add_option("--file", dest="file", 
+		action='callback', callback=self.expand_file, type='str',
                 help="experiment description file")
         self.add_option("--output", dest="outfile", type="string",
Index: fedd/fedd_spewlog.py
===================================================================
--- fedd/fedd_spewlog.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_spewlog.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -12,8 +12,10 @@
         client_opts.__init__(self)
         self.add_option("--experiment_cert", dest="exp_certfile",
-                type="string", help="experiment name certificate file")
+		action='callback', callback=self.expand_file, type='str',
+                help="experiment name certificate file")
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="human readable experiment name")
         self.add_option("--logfile", dest="logfile", default=None,
+		action='callback', callback=self.expand_file, type='str',
                 help="File to write log to")
         self.add_option('--update_time', dest='update', type='int', default=10,
Index: fedd/fedd_terminate.py
===================================================================
--- fedd/fedd_terminate.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_terminate.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -12,5 +12,6 @@
         client_opts.__init__(self)
         self.add_option("--experiment_cert", dest="exp_certfile",
-                type="string", help="experiment certificate file")
+		action='callback', callback=self.expand_file, type='str',
+                help="experiment certificate file")
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="human readable experiment name")
@@ -19,4 +20,5 @@
                 help="Force termination if experiment is in strange state")
         self.add_option("--logfile", dest="logfile", default=None,
+		action='callback', callback=self.expand_file, type='str',
                 help="File to write log to")
         self.add_option("--print_log", dest="print_log", default=False,
Index: fedd/fedd_to_abac.py
===================================================================
--- fedd/fedd_to_abac.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/fedd_to_abac.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -9,16 +9,18 @@
 
 from string import join
-from optparse import OptionParser
 
-from federation.util import abac_pem_type, abac_split_cert
+from federation.util import abac_pem_type, abac_split_cert, file_expanding_opts
 
-class Parser(OptionParser):
+class Parser(file_expanding_opts):
     def __init__(self):
-	OptionParser.__init__(self)
+	file_expanding_opts.__init__(self)
 	self.add_option('--cert', dest='cert', default=None,
+		action='callback', callback=self.expand_file, type='str',
 		help='my fedid as an X.509 certificate')
 	self.add_option('--key', dest='key', default=None,
+		action='callback', callback=self.expand_file, type='str',
 		help='key for the certificate')
 	self.add_option('--dir', dest='dir', default=None,
+		action='callback', callback=self.expand_file, type='str',
 		help='Output directory for credentials')
 	self.add_option('--make-dir', action='store_true', dest='make_dir',
Index: fedd/federation/client_lib.py
===================================================================
--- fedd/federation/client_lib.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/federation/client_lib.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -10,5 +10,5 @@
 
 from fedid import fedid
-from util import fedd_ssl_context
+from util import fedd_ssl_context, file_expanding_opts
 from remote_service import service_caller
 from service_error import service_error
@@ -17,17 +17,24 @@
 
 
-class client_opts(OptionParser):
+class client_opts(file_expanding_opts):
     """
     Standatd set of options that all clients talking to fedd can probably use.
     Client code usually specializes this.
     """
+
     def __init__(self):
-        OptionParser.__init__(self, usage="%prog [opts] (--help for details)",
+        file_expanding_opts.__init__(self,
+		usage="%prog [opts] (--help for details)",
                 version="0.1")
 
-        self.add_option("--cert", action="store", dest="cert",
+        self.add_option("--cert", action="callback", dest="cert", 
+		callback=self.expand_file,
                 type="string", help="my certificate file")
-	self.add_option("--abac", action="store", dest="abac_dir",
-		type="string", help="Directory with abac certs")
+	self.add_option("--abac", action="callback", dest="abac_dir",
+		callback=self.expand_file,
+		type="string", default=os.path.expanduser('~/.abac'), 
+		help="Directory with abac certs")
+	self.add_option('--no_abac', action='store_const', const=None, 
+		dest='abac_dir', help='Do not use abac authorization')
         self.add_option( "--debug", action="count", dest="debug", 
                 default=0, help="Set debug.  Repeat for more information")
@@ -35,5 +42,6 @@
                 dest="serialize_only", default=False,
                 help="Print the SOAP request that would be sent and exit")
-        self.add_option("--trusted", action="store", dest="trusted",
+        self.add_option("--trusted", action="callback", dest="trusted",
+		callback=self.expand_file,
                 type="string", help="Trusted certificates (required)")
         self.add_option("--url", action="store", dest="url",
@@ -98,5 +106,5 @@
     '''
     rv = [ ]
-    if dir:
+    if dir and os.path.isdir(dir):
 	for fn in ["%s/%s" % (dir, p) for p in os.listdir(dir) \
 		if os.path.isfile("%s/%s" % (dir,p))]:
Index: fedd/federation/util.py
===================================================================
--- fedd/federation/util.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/federation/util.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -8,4 +8,6 @@
 
 import httplib
+
+from optparse import OptionParser
 
 from socket import sslerror
@@ -95,4 +97,16 @@
 	    self.set_allow_unknown_ca(True)
 	    self.set_verify(SSL.verify_peer, 10, callback=callb)
+
+class file_expanding_opts(OptionParser):
+    def expand_file(self, option, opt_str, v, p):
+	"""
+	Store the given value to the given destination after expanding home
+	directories.
+	"""
+	setattr(p.values, option.dest, os.path.expanduser(v))
+
+    def __init__(self, usage=None, version=None):
+	OptionParser.__init__(self)
+
 
 def read_simple_accessdb(fn, auth, mask=[]):
Index: fedd/init_abac_authorizer.py
===================================================================
--- fedd/init_abac_authorizer.py	(revision fbee30a0d0f5cfcc2b91b53020c45befeb7899da)
+++ fedd/init_abac_authorizer.py	(revision 62f3dd9d96f5443be02f059e213f4d3f2b67d2e0)
@@ -5,14 +5,21 @@
 
 from optparse import OptionParser
-from federation.authorizer import abac_authorizer
+from federation.authorizer import abac_authorizer, file_expanding_opts
 
 class Parser(OptionParser):
     def __init__(self):
 	OptionParser.__init__(self, usage='%prog [options]')
-	self.add_option('--cert', dest='cert', help='Identity certificate')
-	self.add_option('--key', dest='key', help='Identity key')
+	self.add_option('--cert', dest='cert', 
+		action='callback', callback=self.expand_file, type='str',
+		help='Identity certificate')
+	self.add_option('--key', dest='key',
+		action='callback', callback=self.expand_file, type='str',
+		help='Identity key')
 	self.add_option('--policy', dest='policy', 
+		action='callback', callback=self.expand_file, type='str',
 		help='ABAC policy certificates')
-	self.add_option('--dir', dest='out_dir', help='directory to save into')
+	self.add_option('--dir', dest='out_dir',
+		action='callback', callback=self.expand_file, type='str',
+		help='directory to save into')
 
 parser = Parser()
