Just in case someone else runs into this problem with atlasquery's dynamically loaded shared libraries  (dyld) on Mac Maverick.  I am running Maverick v 10.9.5; XQuartz v 2.7.7; and FSL v 5.0.2.1.

The error:

% atlasquery
dyld: Library not loaded: /home/fs0/cowboy/var/jalapeno4_apple-darwin8-gcc4.0/sandboxes/fsl/extras/lib/libz.1.dylib
  Referenced from: /usr/local/fsl/bin/atlasquery_bin
  Reason: image not found
/usr/local/fsl/bin/atlasquery: line 7:  2693 Trace/BPT trap: 5       ${FSLDIR}/bin/atlasquery_bin "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10"

[*] Note that I used Mark Jenkinson's suggestion for a permanent fix, hence the error is referenced from atlasquery_bin called by script atlasquery:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;af2906e1.1107

Previous fixes posted here would not work for me.  I don't know why but libz.1.dylib does not exist in ${FSLDIR}/bin/fslview.app/Contents/Frameworks:

% ls -l ${FSLDIR}/bin/fslview.app/Contents/Frameworks | egrep libz.1.dylib
[nothing found]

Instead, first I had to find libz.1.dylib on my mac:

% find /usr -name libz.1.dylib
/usr/lib/libz.1.dylib

Then I looked at the libraries that atlasquery_bin links to (egrep finds and displays output that contains 'libz'):

% otool -L /usr/local/fsl/bin/atlasquery_bin | egrep libz
 /home/fs0/cowboy/var/jalapeno4_apple-darwin8-gcc4.0/sandboxes/fsl/extras/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
 /home/fs0/cowboy/var/jalapeno4_apple-darwin8-gcc4.0/sandboxes/fsl/extras/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)

I don't have any directory that starts with /home/fs0.  I had to change this '/home/fs0' directory to my '/usr/lib' using install_name_tool:

% sudo  install_name_tool   -change /home/fs0/cowboy/var/jalapeno4_apple-darwin8-gcc4.0/sandboxes/fsl/extras/lib/libz.1.dylib   /usr/lib/libz.1.dylib   /usr/local/fsl/bin/atlasquery_bin

I had to preface the install_name_tool command with 'sudo' to gain superuser privileges.  (Note: this is a long command and should be issued on a single line.)

Now atlasquery_bin links to libz in /usr/lib:

% otool -L /usr/local/fsl/bin/atlasquery_bin | egrep libz
  /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
  /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)

And, hooray!, atlasquery runs successfully:

% atlasquery
***************************************************
The following COMPULSORY options have not been set:
-a,--atlas name of atlas to use
***************************************************
Part of FSL (build 416)
atlasquery (version 1.0)
[etc]

I hope this helps someone else.  At the very least, I'll be able to find this if I need it again.

Best,
- BettyAnn