Enable RPC of functions in arbitrary modules

This was originally thought as a generalization to make 'os' importable
in the remote process in order to perform ChangeDirectory operations.

Now, I decided to add 'chdir' and 'getcwd' to 'cpymad.libmadx' for
convenience, so this commit is not a necessity for the moment. But I
still believe, that it can prove useful for third party tools that need
to perform special setup (e.g. in MadGUI).