"opensnoop" utility doesn't work with spaces between filenames, how to fix?
-n is only meant to be used with process names like sudo opensnoop -n System\ Preferences. To see what processes access a file, use sudo opensnoop -f /tmp/a\ b.txt.

The change mentioned in the blog post fixes -n but not -f. To fix both of them, edit /usr/bin/opensnoop and replace these lines:

inline string PATHNAME = "'$pathname'";
inline string NAME = "'$pname'";


With this:

inline string PATHNAME = "'"$pathname"'";
inline string NAME = "'"$pname"'";