Fix static abspath function.